<?php echo $session->flash(); ?>
<?php 
echo $form->create(array(
	'id'		=> 'frm',
	'action'	=> 'edit',
	'enctype'	=> 'multipart/form-data',
)); 
?>
 	<div class="input">
      <label><?php echo __('Title', true); ?></label>
      <?php echo $this->Form->input('Picture.name', array('type' => 'text', 'label' => false, 'div' => false)); ?> 
  	</div>
  	<div class="input">
      <label><?php echo __('Sort', true); ?></label>
      <?php echo $this->Form->input('Picture.sortby', array('type' => 'text', 'label' => false, 'div' => false)); ?> 
  	</div><div class="input">
      <label><?php echo __('Link', true); ?></label>
      <?php echo $this->Form->input('Picture.link', array('type' => 'text', 'label' => false, 'div' => false)); ?> 
  	</div>
 	<div class="input">
      <?php
     				echo $form->input(
					'Picture.menu', 
					array(
						'type'		=> 'select', 
						'label'		=>  __('Type', true), 
						'div'		=> false, 
						'options'	=> $type,
						'default'   => $parent
					)
				);
				?> 
  	</div>
 	<div class="input">
		<label>Image file(<300kb)</label>
		<?php if(!empty($this->data['Picture']['image_link'])) { ?>
			<img src="<?php echo IMG_URL .'/pictures/'. $this->data['Picture']['image_link']; ?>" width="60px" /> 
		<?php } ?>
		<?php
			echo $form->input(
				'Picture.image', 
				array(
					'type'		=> 'file', 
					'label'		=> false,
					'div'		=> false, 
					'name'		=> 'upload'
				)
			);
		?>	
   	</div>
    
	<div class="input" align="center" >
      <?php echo $form->button('', array('class'=>'submit', 'type'=>'submit', 'id'=>'regSubmit')); ?>
     	<?php echo $form->button('', array('class'=>'reset', 'type'=>'reset')); ?>
    </div>
    <?php echo $form->hidden('Picture.id'); ?>
<?php echo $form->end(); ?>


